package Text13;

import java.io.*;

public class Main {
    static int N = 32010, n;
    static int[] tr = new int[N];
    static int[] ans = new int[N];

    public static void main(String[] args) throws IOException {
        BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(new OutputStreamWriter(System.out));
        n = Integer.parseInt(read.readLine());
        for (int i = 0; i < n; i++) {
            String[] s = read.readLine().split(" ");
            int x = Integer.parseInt(s[0]) + 1;
            ans[sum(x)]++;
            add(x, 1);
        }
        for (int i = 0; i < n; i++) {
            writer.println(ans[i]);
        }
        writer.flush();
    }

    private static int lowbit(int x) {
        return x & -x;
    }

    private static void add(int x, int v) {
        for (int i = x; i <= N; i += lowbit(i)) {
            tr[i] += v;
        }
    }

    private static int sum(int x) {
        int res = 0;
        for (int i = x; i > 0; i -= lowbit(i)) {
            res += tr[i];
        }
        return res;
    }
}
